home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Demos
/
ByCompany
/
Schema_Research
/
SchemaE
/
SchemaE.app
/
Reports
/
Sybase_Table.sqrl
< prev
next >
Wrap
Text File
|
1994-03-30
|
1KB
|
54 lines
template "Sybase_Table.rtf" quotes "[" "]"
app "Edit"
repeat [ /* for each table */
objectid int,
name string
using [ select id, name
from sysobjects
where type = 'U' and name not in ("edcomment","edicon","edobject","edcolumn","edkey") order by name ]
repeat [ /* for each table print the table comments */
tcomment string
using [select edcomment.comment
from edcomment where
edcomment.colid = 0
and id = @objectid
order by sequence]
]
repeat [ /* for each column of a table */
colname string,
datatype string,
length string,
colid int
/* column stuff string */
using [select
col_name = syscolumns.name,
type_name = systypes.name,
syscolumns.length,
syscolumns.colid
from
syscolumns,
systypes
where
systypes.usertype = syscolumns.usertype
and syscolumns.id = @objectid
order by colid
] /* using */
repeat [ /* for each column print the comments */
comment string
using [select edcomment.comment
from edcomment where
edcomment.colid = @colid
and id = @objectid
order by sequence
]]
] /* column */
] /* for each table */